import React, { Component } from 'react'
import LifeCycle from './views/LifeCycle'
export default class App extends Component {
  state={
    isshow:true
  }
  render() {
    return (
      <div>
        {
          this.state.isshow===true&&<LifeCycle title={"生命周期演示"}></LifeCycle>
        }
        <button onClick={()=>{
          this.setState(()=>{
            return{
              isshow:!this.state.isshow
            }
          })
        }}>创建和销毁组件</button>
      </div>
    )
  }
}
